Conversation
b9fe6c4 to
055ee99
Compare
9bf8b78 to
54c7b5e
Compare
- Moved unit tests from `tests/` to `tests/unit/` - Added dummy e2e test in `tests/e2e/` - Updated pytest setup to not run tests mark as e2e - Added docker image to run e2e tests with `docker compose run --rm e2e` - Added `pytest-rerunfailures` dev dependency to rerun failed api calls (flaky tests) - Update Error handler to handle JSON responses for generic HTTP Errors (404, 401, ...)
54c7b5e to
8e5fbd9
Compare
|
| run: docker compose run --service-ports app_test | ||
|
|
||
| - name: "Run E2E test" | ||
| run: docker compose run --service-ports -e MPT_API_BASE_URL=$MPT_API_BASE_URL -e MPT_API_TOKEN=$MPT_API_TOKEN e2e |
There was a problem hiding this comment.
Keep in mind that the values of these parameters depend on the branch for main --> test env/ for release/* - staging env
There was a problem hiding this comment.
env:
MPT_API_BASE_URL: ${{ secrets.MPT_API_BASE_URL }}
MPT_API_TOKEN: ${{ secrets.MPT_API_TOKEN }}
There was a problem hiding this comment.
we may have to review this part. But so far we can control those variables from the pipeline setup.
|
|
||
|
|
||
| @pytest.mark.flaky(reruns=5, reruns_delay=0.01) # noqa: WPS432 | ||
| @pytest.mark.e2e |
There was a problem hiding this comment.
Could you remind me what marks should be here? Looks a little bit extra to have e2e folder and e2e mark at the same time
There was a problem hiding this comment.
I completely agree, we have not taken a final call in which way to go.
Current setup if you run pytest with no parameters, the e2e will not run.
We can cleanup these marks in the future after we do the final call on the TDR.



tests/totests/unit/tests/e2e/docker compose run --rm e2epytest-rerunfailuresdev dependency to rerun failed api calls (flaky tests)